<?php
    include 'include/admin_function.php';
    valid_admin();
    if (!isset($_POST['submit']))
        header("Location: index");
    if ($_POST['submit'] == "Edit")
        edit_contest($_POST['contest_id'], $_POST['title'], $_POST['start_time'], $_POST['end_time']);
    else if ($_POST['submit'] == "Delete")
        delete_contest($_POST['contest_id']);
    header("Location: index");
?>
